<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'peserta-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
	// 'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

<?php echo $form->textFieldRow($model,'id',array('class'=>'span5')); ?>
<?php echo  '';
			$dataKelas = Kelas::model()->findAll(array('order' => 'nama_kelas'));
		    $listKelas = CHtml::listData($dataKelas,'id', 'nama_kelas');
		    echo $form->select2Row($model, 'tb_kelas_id', array(
			   'data' => $listKelas,

			))
			; ?>
<?php echo $form->textFieldRow($model,'nama',array('class'=>'span5','maxlength'=>100)); ?>
<?php echo $form->textFieldRow($model,'jenis_kelamin',array('class'=>'span5','maxlength'=>1)); ?>
<?php echo $form->textFieldRow($model,'tempat_lahir',array('class'=>'span5','maxlength'=>20)); ?>
<?php echo $form->datepickerRow($model,'tanggal_lahir',
								array(
					                'options' => array(
					                    'language' => 'id',
					                    'format' => 'yyyy-mm-dd', 
					                    'weekStart'=> 1,
					                    'autoclose'=>'true',
					                    'keyboardNavigation'=>true,
					                ), 
					            ),
					            array(
					                'prepend' => '<i class="icon-calendar"></i>'
					            )
			);; ?>
<?php echo $form->textAreaRow($model,'alamat',array('rows'=>6, 'cols'=>50, 'class'=>'span8')); ?>
<?php echo $form->textFieldRow($model,'telepon',array('class'=>'span5','maxlength'=>15)); ?>
<?php echo $form->textFieldRow($model,'pendidikan_terakhir',array('class'=>'span5','maxlength'=>20)); ?>
<?php echo $form->textFieldRow($model,'foto',array('class'=>'span5','maxlength'=>100)); ?>
<?php echo $form->textFieldRow($model,'tahun_ajaran',array('class'=>'span5')); ?>
<?php echo $form->datepickerRow($model,'tanggal_daftar',
								array(
					                'options' => array(
					                    'language' => 'id',
					                    'format' => 'yyyy-mm-dd', 
					                    'weekStart'=> 1,
					                    'autoclose'=>'true',
					                    'keyboardNavigation'=>true,
					                ), 
					            ),
					            array(
					                'prepend' => '<i class="icon-calendar"></i>'
					            )
			);; ?>
<?php echo $form->datepickerRow($model,'tanggal_mulai',
								array(
					                'options' => array(
					                    'language' => 'id',
					                    'format' => 'yyyy-mm-dd', 
					                    'weekStart'=> 1,
					                    'autoclose'=>'true',
					                    'keyboardNavigation'=>true,
					                ), 
					            ),
					            array(
					                'prepend' => '<i class="icon-calendar"></i>'
					            )
			);; ?>
<?php echo $form->datepickerRow($model,'tanggal_selesai',
								array(
					                'options' => array(
					                    'language' => 'id',
					                    'format' => 'yyyy-mm-dd', 
					                    'weekStart'=> 1,
					                    'autoclose'=>'true',
					                    'keyboardNavigation'=>true,
					                ), 
					            ),
					            array(
					                'prepend' => '<i class="icon-calendar"></i>'
					            )
			);; ?>
<?php echo $form->passwordFieldRow($model,'password',array('class'=>'span5','maxlength'=>100)); ?>


<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
</div>

<?php $this->endWidget(); ?>
